package com.taotao.delayjob.core.service.impl;


import com.taotao.delayjob.core.mapper.RetryInstMapper;
import com.taotao.common.model.Pagination;
import com.taotao.delayjob.core.model.RetryInst;
import com.taotao.delayjob.core.model.RetryInstPageData;
import com.taotao.delayjob.core.model.RetryInstPageParam;
import com.taotao.delayjob.core.service.RetryInstService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 任务重试实例服务接口实现类
 * </p>
 *
 * @author Fan Beibei
 * @version V1.0
 * @since 2024-07-17 10:22:26
 */
@Slf4j
@Service
public class RetryInstServiceImpl implements RetryInstService {
    @Resource
    private RetryInstMapper retryInstMapper;


    @Override
    public RetryInst getById(Long id) {
        return retryInstMapper.selectById(id);
    }

    @Override
    public Pagination<RetryInstPageData> queryPage(RetryInstPageParam param, int pageNum, int pageSize) {
        return Pagination.fromPage(retryInstMapper.queryPage(param, pageNum, pageSize));
    }
}
